<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.infomanage.po.*" %>
<%@page import="com.infomanage.vo.*" %>
<%@page import="com.infomanage.service.plan.*"%>
<%  response.addDateHeader("Expires", 0);response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache");%>
<%
    request.setCharacterEncoding("UTF-8");
	String deviceId = request.getParameter("planId");
    if(deviceId == null) deviceId = "";
    
    DevicerepairPlanItem planItem = DeviceRepairPlanService.loadDeviceRepairPlan(request, response, out);
    int personId = -1;
    int owndeptId = -1;
    int usedeptId = -1;
    String personname = "";
    String owndeptName = "";
    String usedeptName = "";
    String description= "";
    String lastRepairdate = "";
    String planRepairdate = "";
    String deviceType= "";
    String deviceName = "";
    if(planItem != null) {
    	DevicerepairPlan plan = planItem.getBean();
		Department owndept = planItem.getOwnDept();
		Department usedept = planItem.getUseDept();
		Person person = planItem.getPerson();
		personId = plan.getPersonId();
		owndeptId = plan.getOwndeptId();
		usedeptId = plan.getUsedeptId();
	    personname = person.getName();
	    owndeptName = owndept.getPath();
	    usedeptName = usedept.getPath();
	    description = plan.getDesciption();
	    deviceName = plan.getDeviceName();
	    lastRepairdate = plan.getLastRepairdate();
	    planRepairdate = plan.getPlanRepairdate();
	    deviceType = plan.getType();
    } 
%>
<html>
<head>
	<title>设备维修计划</title>
	<link href="../../css/table.css" rel="stylesheet" type="text/css">
</head>
<body  rightmargin="0" bottommargin="0" leftmargin="0" topmargin="0">
	<table class="dialogTable" cellpadding="0" cellspacing="0">
		<!-- 表头-->
		<tr class="dialogTableHeader">
			<td>装备修理计划</td>
		</tr>
		<!-- 表数据-->
		<tr class="dialogTableContent">
			<td>
				<!-- 数据项 -->
				<table class="dataTable">
					<col width="30%">
					<col width="70%">
					<tr>
						<td class="field">
							设备名称
						</td>
						<td>
							<%=deviceName %>
						</td>
					</tr>
					<tr>
						<td class="field">
							所属单位
						</td>
						<td>
							<%=owndeptName %>
						</td>
					</tr>
					<tr>
						<td class="field">
							使用单位
						</td>
						<td>
							<%=usedeptName %>
						</td>
					</tr>
					<tr>
						<td  class="field">
							负责人
						</td>
						<td>
							<%=personname %>
						</td>
					</tr>
					<tr>
						<td class="field">
							型号
						</td>
						<td>
							<%=deviceType %>
						</td>
					</tr>
					<tr>
						<td class="field">
							上次维修时间
						</td>
						<td>
							<%=lastRepairdate %>
						</td>
					</tr>
					<tr>
						<td class="field">
							计划维修时间
						</td>
						<td>
							<%=planRepairdate %>
						</td>
					</tr>
					<tr style="height: 100px">
						<td class="field">
							备注
						</td>
						<td valign="top">
							<textarea style="width: 100%;height: 100%;background-color:#dfe8f6" readonly><%=description %></textarea>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td class="tableBtn">
				<span onclick="window.print();">打印</span>			
				<span onclick="window.close();">关闭</span>
			</td>
		</tr>
		<tr valign="top">
			<td colspan="2">
				&nbsp;
			</td>
		</tr>
	</table>
</body>
</html>